package main;

import exceptions.Util;

/**
 * The main class of the program.<br>
 * <br>
 * Starts port listeners' threads and waits for them to die.
 *
 * @author Mihail A. Muhin
 */
public class MainThread {
	public static void main(String[] args) {
		interfaces.clients.connection.PortListener cpl = new interfaces.clients.connection.PortListener();
		interfaces.admin.PortListener apl = new interfaces.admin.PortListener();
		cpl.start();
		apl.start();

		while (cpl.isAlive() || apl.isAlive()) {
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				Util.LogError("No InterruptedException should occur while the main process is sleeping");
			}
		}
	}
}